#ifndef OSKOLOK_H
#define OSKOLOK_H

#include <QtGui>
#include "collisia_control.h"
#include "cash.h"

class OSKOLOK : public QGraphicsObject
{
    Q_OBJECT

    QPainterPath *border;
    QPixmap *im;

    QGraphicsItemAnimation *anim_rocket;
    QTimeLine *rocket_time_line;

    int timer_id;

    int num; // какой из осколков показать

    int rotate;

    COLLISIA_CONTROL *collisia_control;

    int point;

public:

    explicit OSKOLOK(int num, int speed, SCENE *scene, QTimeLine *global_tl, CASH *cash);

    QPainterPath shape() const;

    QRectF boundingRect() const;

    void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *);

    void timerEvent(QTimerEvent *);

    ~OSKOLOK();

    int type() const;
    
signals:


    
public slots:

    void Damage_Detected(QPointF a,int d);
    
};

#endif // OSKOLOK_H
